home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98a.txt
/
000168_icon-group-sender _Thu Apr 16 14:55:54 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
9KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id OAA06576
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Thu, 16 Apr 1998 14:55:53 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA28494; Thu, 16 Apr 1998 14:55:52 -0700
Message-Id: <s5362d99.023@housmtp.oceaneering.com>
X-Mailer: Novell GroupWise 4.1
Date: Thu, 16 Apr 1998 16:09:15 -0600
From: Charles Hethcoat <CHETHCOA@oss.oceaneering.com>
To: icon-group@optima.CS.Arizona.EDU
Subject: Icon Sims -Reply
Mime-Version: 1.0
Content-Type: text/plain
Content-Disposition: inline
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
Content-Length: 7569
Mark Evans wrote:
+I understand why you think that the web is the most convenient
cross-platform interface. I suppose I agree with that proposition.
Well, it seems there is some disagreement on this point. It IS clumsy and
inefficient, but for me, with what I know now, and my circumstances, it
looks like the easiest and fastest way to get "on the air" with the minimum
assumptions about the user's hardware, software, and situation.
+ But
what makes Icon special for the simulation aspect? I.e. what about
numerical programs like Mathematica and MATLAB? They are also
cross-platform.
Yes. I don't have any problem with them, just little experience. My
company doesn't buy stuff on a whim, so I just don't have them. Which
is part of the reason I haunt free software venues like this one! I did
download Octave (the free MATLAB lookalike) to try it out.
But this, as they say, is an Icon mailing list. So I just wanted to point out
that Icon has underappreciated potential as a tool for writing small,
experimental programs for engineers and scientists. And it is looking
pretty http-friendly as well. So I say, "if you are thinking of coding
something in C or Fortran or Pascal, do yourself a favor: look at Icon."
+Off the top of my head, it would never have dawned on me to do
simulations in Icon. Have you been very successful?
On a small scale, yes...but I hasten to add I don't do a lot of extremely
LARGE simulations. I have seen enough to convince me we have barely
scratched the surface of what can be done with Icon in this type of
application. Based on what I know now, I would not hesitate to try
writing a twenty-degree-of-freedom automobile simulation program in
Icon. If I needed to, of course.
+ Is there anything
about the Icon language that makes doing simulations easier than any
other?
It has all the basic floating point necessities, if not the conveniences, of
Fortran. But the facility in handling lists, strings, tables, records, etc. is
what makes it really shine. I can easily add identifiers, a cool input
notation, and use all kinds of computer science algorithms (sorts, tree
and graph searches, etc.) and code all of it without much declarative
hassle. You can do this stuff in Fortran and C but it's exhausting. With
Icon, it's easy.
+Could you outline the nature of your software for me? What does
it do? What is it for? What does the user see?
+Would you be willing to share your code with me? I might find uses for
it and could possibly enhance it. I have to earn a living too, but I
work as a consultant and my clients generally let me pick my own tools.
My Runge-Kutta stuff is still being debugged. The constant-stepsize
version works like a champ. The variable-stepsize version is under
construction...I should be trying it out this weekend. It came about
because I needed to replace a certain TK Solver program. This program
calculates venting of space vehicles, and the attendant pressure
differentials, with a view to validating the structural design. It involves
solving a nonlinear first-order ordinary differential equation. The TK
version works fine. But, and this is a big BUT, it is too hard for casual
users to comprehend. I can and do use it, but I would like to post it on
our local network for others to use as well. Trouble is, hardly anybody
knows TK, and it isn't all that easy to set up. So I want to replace it with
a program and a set of instructions that are easy for anybody to deal
with.
I have been meaning to put some of it in the library and have just been
procrastinating. I'll try to speed this up.
Here is what vcalc, the vector calculator, does:
(BEGINNING OF VCALC INPUT)
This is an example
of vcalc input. This is
a paragraph
of ASCII words
that will be processed
by some kind of
document preparation
software, say LaTex,
when the proper markup
is added. But now
I just want to show what
vcalc does by itself.
Vcalc uses RPN ("Shilop")
notation, which makes
some people go ):?(
but makes implementors
like me go (|:?=).
(Really, RPN is not
essential to the idea of vcalc.
It's just easy to do.)
Multiple paragraphs
are separated
by blank
lines.
The '>' character in position 1
introduces a calculation:
> 2 a=; 3 b=; 7 c=;
> a \sqr
> b \sqr \add
> c \sqr \add \sqrt L= \print;
See how the answer is
printed out in-line
in the output? That's
to leave an audit trail
when calculations start
getting really rough.
Then more ordinary
textual material
follows.
Here is another example:
> 2 3 \mul 7 \add \print;
Vcalc can also do vectors.
For example, what is the
moment of force F about
point A, if it acts through
point B?
GIVEN:
The force F is
> (4.3, 5.7, -0.2) F=;
Points A and B are
> (0., 0., 0.) A=;
and
> (1., 1., 3.) B=;
REQUIRED:
The torque T of F about
B.
METHOD:
The radius vector R is B - A, or:
> B A \sub R= \print;
The torque is the cross product
F x R, or
> F R \cross T= \print;
And that's really the whole idea.
Charles Hethcoat
(END OF VCALC INPUT)
Now you run this through vcalc and get:
(BEGINNING OF VCALC OUTPUT)
vcalc: Oceaneering Space Systems' Vector Calculator
$Id: vcalc.icn 1.3 1998/02/17 17:02:27 CHETHCOA Exp CHETHCOA $
Run date: Thursday, April 16, 1998 2:45 pm
1 This is an example
2 of vcalc input. This is
3 a paragraph
4 of ASCII words
5 that will be processed
6 by some kind of
7 document preparation
8 software, say LaTex,
9 when the proper markup
10 is added. But now
11 I just want to show what
12 vcalc does by itself.
13
14 Vcalc uses RPN ("Shilop")
15 notation, which makes
16 some people go ):?(
17 but makes implementors
18 like me go (|:?=).
19 (Really, RPN is not
20 essential to the idea of vcalc.
21 It's just easy to do.)
22
23 Multiple paragraphs
24 are separated
25 by blank
26 lines.
27
28 The '>' character in position 1
29 introduces a calculation:
30
31 > 2 a=; 3 b=; 7 c=;
32 > a \sqr
33 > b \sqr \add
34 > c \sqr \add \sqrt L= \print;
-----> L = 7.874007874011811
35
36 See how the answer is
37 printed out in-line
38 in the output? That's
39 to leave an audit trail
40 when calculations start
41 getting really rough.
42
43 Then more ordinary
44 textual material
45 follows.
46
47 Here is another example:
48
49 > 2 3 \mul 7 \add \print;
-----> = 13
50
51 Vcalc can also do vectors.
52 For example, what is the
53 moment of force F about
54 point A, if it acts through
55 point B?
56
57 GIVEN:
58
59 The force F is
60 > (4.3, 5.7, -0.2) F=;
61
62 Points A and B are
63 > (0., 0., 0.) A=;
64 and
65 > (1., 1., 3.) B=;
66
67 REQUIRED:
68
69 The torque T of F about
70 B.
71
72 METHOD:
73
74 The radius vector R is B - A, or:
75 > B A \sub R= \print;
-----> R = (1.0, 1.0, 3.0)
76
77 The torque is the cross product
78 F x R, or
79 > F R \cross T= \print;
-----> T = (17.3, -13.1, -1.4)
80
81 And that's really the whole idea.
82
83 Charles Hethcoat
(END OF VCALC OUTPUT)
Yours,
Charlie